package Server.ServerMainFrame.ServerMainFrameController;

import java.awt.event.*;
import javax.swing.*;


import Server.ServerMainFrame.ServerMainFrameView.*;
import Server.ServerMainFrame.ServerMainFrameModel.*;
import Server.ServerMainFrame.ServerMainFrameController.*;

public class ExitButtonListener implements ActionListener 
{
	public ExitButtonListener(ServerMainFrameView view)
	{
		this.serverMainFrameView = view;
	}
    public void actionPerformed(ActionEvent event)
    {
        int option = JOptionPane.showConfirmDialog(this.serverMainFrameView.frame, "Do you want to quit?");
        
        if (option == JOptionPane.YES_OPTION)
        {
        	System.exit(0);
        }
    }
    private ServerMainFrameView serverMainFrameView;
}
